package main
import (
	"fmt"
)

// interface definition
type VowelsFinder interface {
    FindVowels() []rune
}

type MyString string

// MyString implements VowelsFinder
func (ms MyString) FindVowels() []rune {
    var vomels []rune
    for _, rune := range ms {
        if rune == 'a' || rune == 'e' || rune == 'i' || rune == 'o' || rune == 'u' {
            vomels = append(vomels, rune)
        }
    }
    return vomels
}


// 18. 接口（一）
func main(){
    name := MyString("yang hao")
    var v VowelsFinder
    v = name

    fmt.Println("v= ", v)
    fmt.Printf("\nVowels are %c", v.FindVowels())

}